package com.gzh.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Date;

/**
 * @Description:
 * @package: com.gzh.springmvc.controller
 * @Auther: Pf.Guo
 * @Date: Created in 2021/2/15 13:20
 */

@Controller
public class DemoController {

    @RequestMapping("/demo")
    public String goTestPage(Model model) {
        Date date = new Date();
        model.addAttribute("date", date);
        // 视图信息(封装跳转的页面信息) 逻辑视图名
        return "success";
    }
}
